/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       fontloader.h
 * Author:     karooolek
 * Created on: 2014-01-20
 *
 **********************************************************************************************************************/

#ifndef FONTLOADER_H_
#define FONTLOADER_H_

#include "fontfactory.h"
#include "../common.h"

namespace mGameEngine
{
namespace Graphics
{

/**
 * Font file loader.
 * Loads fonts from all supported file formats.
 */
class FontLoader : public FontFactory, public FileLoader
{
public:
    /**
     * Load font from file.
     * @param filename font file name to load.
     * @return loaded font.
     */
    static Font *loadFontFromFile(const String &filename);

    /**
     * Create font loader with no file name specified.
     */
    FontLoader();

    /**
     * Create font file loader with specified file name.
     * @param filename font file name to load
     */
    FontLoader(const String &filename);

    /**
     * Destroy font file loader.
     */
    virtual ~FontLoader();

    /**
     * Load font from file.
     */
    virtual void load();

    /**
     * Unload font.
     */
    virtual void unload();
};

}
}

#endif // FONTLOADER_H_
